define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'crm/product.source/index',
        add_url: 'crm/product.source/add',
        edit_url: 'crm/product.source/edit',
        delete_url: 'crm/product.source/delete',
        modify_url: 'crm/product.source/modify',
        recycle_url: 'crm/product.source/recycle'
    };

    var Controller = {

        index: function () {

            ea.table.render({
                init: init,
                cols: [[
                    { type: "checkbox", width: 50 },
                    { field: 'id', width: 60, title: 'ID', sort: true, search:false},
                    { field: 'name', title: '来源名称' },   
                    { field: 'intro', title: '来源说明' , search:false},      
                    { title: '操作', minWidth: 80, width: 160, templet: ea.table.tool, align: "center", fixed: 'right' }
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
        password: function () {
            ea.listen();
        }
    };
    return Controller;
});